package demo3;

//上网套餐类
public class OnlinePackage extends Package implements OnlineSrvInterFace {
    private double onileFlux; //上网流量

    public OnlinePackage() {
    }

    public OnlinePackage(double onileFlux) {
        setOnileFlux(onileFlux);
    }

    public double getOnileFlux() {
        return onileFlux;
    }

    public void setOnileFlux(double onileFlux) {
        this.onileFlux = onileFlux;
    }

    //显示所有套餐信息
    public void onlinePackagesShow(){
        System.out.println("上网套餐每月资费：" + getRate() + " 上网流量：" + getOnileFlux() + "G");
    }

    //重写抽象类里的方法
    @Override
    public void showRate() {
        System.out.println("重写抽象类中方法 上网套餐每月资费"+getRate());
    }

    @Override
    public void netSrvShow(double onileFlux, PhoneCardType cardType) {
        String ct = cardType.getCtype();
        System.out.println("上网套餐类中上网服务接口的实现：" + ct + "上网流量:" + onileFlux + "G");
    }
}
